﻿namespace Samurai.Wakizashi.Workflow
{
    public interface IParallelWorkflow<T> where T : class, IWorkflowContext
    {
        /// <summary>
        /// Gets the number of sequential workflows registered with this instance.
        /// </summary>
        /// <value>The count.</value>
        int Count { get; }

        /// <summary>
        /// Registers a workflow to be executed in parallel with all other registered workflows.
        /// </summary>
        /// <param name="sequentialWorkflow">The sequential workflow.</param>
        void RegisterWorkflow(ISequentialWorkflow<T> sequentialWorkflow);

        /// <summary>
        /// Clears all registered sequential workflows from this instance.
        /// </summary>
        void Clear();
    }
}
